<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改sql查询语句')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-systemSqlquery-edit" th:object="${systemSqlquery}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">描述：</label>
				<div class="col-sm-8">
					<input id="desc" name="desc" th:field="*{desc}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">内容：</label>
				<div class="col-sm-8">
					<textarea id="val" name="val" th:field="*{val}" class="form-control" type="text" rows="10"></textarea>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">名称：</label>
				<div class="col-sm-8">
					<input id="name" name="name" th:field="*{name}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">语句类型：</label>
				<div class="col-sm-8">
					<select id="sqlType" name="sqlType" class="form-control m-b" th:with="type=${@dict.getType('sql_type')}">
						<option value="">请选择</option>
						<option th:each="dict : ${type}"  th:selected="(${dict.dictValue} == *{sqlType})"  th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/systemSqlquery";
		$("#form-systemSqlquery-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-systemSqlquery-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
